﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZL.WeChatCard.Entity.EasyUse
{
    public class ProfileAccinfo
    {
        private string _cellno = string.Empty;
        private string _area = string.Empty;
        private string _email = string.Empty;
        private string _glsr = string.Empty;
        private string _nldsm = string.Empty;
        private string _dycardno = string.Empty;

        /// <summary>
        ///  手机号
        /// </summary>
        public string cellno
        {
            get { return _cellno; }
            set { _cellno = value; }
        }

        /// <summary>
        ///  所在地
        /// </summary>
        public string area
        {
            get { return _area; }
            set { _area = value; }
        }

        /// <summary>
        ///  email
        /// </summary>
        public string email
        {
            get
            {
                if (_email == null) return string.Empty;
                return _email;
            }
            set { _email = value; }
        }

        /// <summary>
        ///  性别
        /// </summary>
        public short sex { get; set; }

        /// <summary>
        ///  阳历生日
        /// </summary>
        public string glsr
        {
            get { return _glsr; }
            set { _glsr = value; }
        }

        /// <summary>
        ///  年龄段id
        /// </summary>
        public int nld { get; set; }

        /// <summary>
        ///  年龄段说明
        /// </summary>
        public string nldsm
        {
            get { return _nldsm; }
            set { _nldsm = value; }
        }

        /// <summary>
        ///  本次查询生成的动态凭证号
        /// </summary>
        public string dycardno
        {
            get { return _dycardno; }
            set { _dycardno = value; }
        }


        public string month
        {
            get
            {
                if(!string.IsNullOrEmpty(glsr))
                return glsr.Split('|')[0];
                return "";
            }
        }

        public string day
        {
            get
            {
                if (!string.IsNullOrEmpty(glsr))
                    return glsr.Split('|')[1];
                return "";
            }
        }

        public string Province
        {
            get
            {
                if (!string.IsNullOrEmpty(area))
                    return area.Split('|')[0];
                return "";
            }
        }

        public string City
        {
            get
            {
                if (!string.IsNullOrEmpty(area))
                    return area.Split('|')[1];
                return "";
            }
        }

        public bool Issuccess { get; set; }

        public string errormsg { get; set; }
    }
}
